package com.jtny.nytb.weather.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ApiModel("配置结果详细VO对象")
@Data
public class ConfigResultsDetailVO {

//    @ApiModelProperty("主键id")
//    private Long id;
//
//    @ApiModelProperty("关联的天气基础信息id")
//    private Long basicInfoId;
//
//    @ApiModelProperty("城市")
//    private String city;

    @ApiModelProperty("参数编号")
    private String paramCode;

    @ApiModelProperty("参数名称")
    private String paramName;

    @ApiModelProperty("参数值")
    private String paramValue;

    @ApiModelProperty("数据产生时间")
    private String dataTime;


//    public static List<Map<String, Object>> transformData(List<ConfigResultsDetailVO> details) {
//        return details.stream()
//                .collect(Collectors.groupingBy(ConfigResultsDetailVO::getBasicInfoId))
//                .values().stream()
//                .map(group -> {
//                    Map<String, Object> result = new HashMap<>();
//                    group.forEach(vo -> {
//                        if (!result.containsKey("basicInfoId")) {
//                            result.put("basicInfoId", vo.getBasicInfoId());
//                        }
//                        result.put(vo.getParamName(), vo.getParamValue());
//                    });
//                    return result;
//                })
//                .collect(Collectors.toList());
//    }


}
